package StudyCode.summary.mydatetime;

import java.time.Month;
import java.time.YearMonth;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingYearMonth {
	public static void main(String[] args) {
		YearMonth ym1 = YearMonth.of(2016, Month.MAY); // 2016-05

		int monthLen = ym1.lengthOfMonth();
		System.out.println(ym1 + "月有" + monthLen + "天");

		int yearLen = ym1.lengthOfYear();
		System.out.println(ym1 + "年有" + yearLen + "天");

	}
}
